1. Field of the Invention
The present invention relates to a digital image processing field, and in particular, to a Two-Dimensional (2D) image segmentation apparatus and method, which segment the pixels of a progressive input image for detecting a specific pattern of the image, and an apparatus and method for removing red-eye in 2D image, which can remove red-eye in the segmented area.
2. Description of the Related Art
Recently, a pattern recognition technology that recognizes a specific shape through an image process is applied to a variety of industry fields. Examples of the pattern recognizing technology include well-known pattern recognition technologies such as a pattern recognition system that detects eyelid tremor in order to prevent to drive while drowsy, a character recognition system that recognizes characters from an image scanned through a scanner, and a fingerprint recognition system.
Such a pattern recognition technology requires a technology that segments the pixels of an entire image in order to detect shapes for recognition from the entire image generated by a camera and the like.
Generally, a segmentation algorithm used in the pattern recognition technology includes the first analysis process that analyzes a feature of a portion of an input image to be detected from the input image, and the second analysis process that transforms the input image into a binary image representing only specific information and thereafter recognizes it as one group using the shape information of a portion of the input image to be detected through the first analysis process. For example, the pattern recognition process, which recognizes eye regions for removing red-eye in an image photographed by a camera, is a process that generates the binary image representing only pixels representing red in an image photographed through the first analysis process, and segments each of pixels of the binary image through the second analysis process to determine groups corresponding to the shapes of eyes. In such a pattern recognition process, the segmentation algorithm may be performed.
Examples of a related art image segmentation algorithm include a grass-fire algorithm that detects patterns in eight directions at one point to perform segmentation, and an algorithm that pre-inputs information of patterns and detects patterns using a correlation with an input image. However, in a case of the related segmentation algorithm, since an operation time is very slow and a complicated operation is required, a microprocessor must necessarily be used for the operation process. Accordingly, in a case of the related art segmentation algorithm, it is impossible to perform a real-time segmentation process on the pixels of a progressive input image, and the cost increases due to an expensive microprocessor. Moreover, it is difficult to apply the related art segmentation algorithm to devices requiring miniaturization such as portable phones.
On the other hand, the related art image segmentation algorithm can be applied to a technology for removing red-eye in a digital image. That is, a segmentation on red-eye occurring areas in a Two-Dimensional (2D) digital image is performed using the related art segmentation algorithm, and a red-eye removing algorithm can be applied using the coordinates of the segmented areas.
Generally, examples of the related art technology for removing red-eye include a scheme that replaces a red-eye occurring area with a specific color, and a scheme that manipulates an image through masking.
The scheme replacing with a specific color that determines which area an input pixel is in, and thereafter checks whether a color of a corresponding pixel is in a skin color area or a color corresponding to red-eye when the input pixel is in an area to be manipulated. At this point, when the check result shows that the color of the corresponding pixel is the color corresponding to red-eye, the corresponding pixel is replaced with black. Since such a scheme requires a small amount of operation and a small memory space, it requires a very fast operation speed and a small memory space. However, when a pixel determined as red-eye is replaced with a specific color, an image-manipulated fact can clearly be represented because the colors of eyes become monotonous.
The masking-based scheme is a scheme that makes a color near to black by applying a mask having the same size as that of an area having a low coefficient to the area to be manipulated. Because the masking-based scheme can make the colors of eyes natural, it reduces the possibility that users can recognize a color-manipulated fact. However, the masking-based scheme requires a space to store an area to be manipulated, and thus a size of a memory space increases because information to be stored increases as a size of an area to be manipulated increases. Furthermore, in a case of the masking-based scheme, since a size of an area to be manipulated varies, the mask must also be variable. Moreover, since an operation speed becomes slow as an operation area increases, the masking-based scheme is unsuitable for a system requiring a high-speed operation.